import common from '../vendor/common'
import '../scss/map_controls.scss'
const mui = common.mui
try{
  mui.plusReady(function(){
  })
} catch(e) {
  console.log('地图控件出错了')
}
mui('#js_btnTap').on('tap', '.map-btn-item', function() {
  mui('#js_btnTap .map-btn-item.active')[0].classList.remove('active')
  this.classList.add('active')
  mui.fire(
    plus.webview.getWebviewById('map.html'), 
    'searchNear', 
    {
      key: mui(this)[0].querySelectorAll('.text-box')[0].innerHTML
    }
  )
})
document.addEventListener('reload', function() {
  mui('#js_btnTap .map-btn-item.active')[0].classList.remove('active')
  mui('#js_btnTap .map-btn-item')[0].classList.add('active')
})